3.478 \(\int \sec ^4(e+f x) (b (c \tan (e+f x))^n)^p \, dx\)

Optimal. Leaf size=65 \[ \frac{\tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+3)}+\frac{\tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+1)} \]

[Out]

(Tan[e + f*x]*(b*(c*Tan[e + f*x])^n)^p)/(f*(1 + n*p)) + (Tan[e + f*x]^3*(b*(c*Tan[e + f*x])^n)^p)/(f*(3 + n*p)
)

________________________________________________________________________________________

Rubi [A]  time = 0.111186, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3659, 2607, 14} \[ \frac{\tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+3)}+\frac{\tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+1)} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^4*(b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Tan[e + f*x]*(b*(c*Tan[e + f*x])^n)^p)/(f*(1 + n*p)) + (Tan[e + f*x]^3*(b*(c*Tan[e + f*x])^n)^p)/(f*(3 + n*p)
)

Rule 3659

Int[(u_.)*((b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> Dist[(b^IntPart[p]*(b*(c*Tan[e + f*x
])^n)^FracPart[p])/(c*Tan[e + f*x])^(n*FracPart[p]), Int[ActivateTrig[u]*(c*Tan[e + f*x])^(n*p), x], x] /; Fre
eQ[{b, c, e, f, n, p}, x] &&  !IntegerQ[p] &&  !IntegerQ[n] && (EqQ[u, 1] || MatchQ[u, ((d_.)*(trig_)[e + f*x]
)^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \sec ^4(e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx &=\left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \int \sec ^4(e+f x) (c \tan (e+f x))^{n p} \, dx\\ &=\frac{\left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \operatorname{Subst}\left (\int (c x)^{n p} \left (1+x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \operatorname{Subst}\left (\int \left ((c x)^{n p}+\frac{(c x)^{2+n p}}{c^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (1+n p)}+\frac{\tan ^3(e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (3+n p)}\\ \end{align*}

Mathematica [A]  time = 2.09433, size = 87, normalized size = 1.34 \[ \frac{\cot (e+f x) \left (2 \left (-\tan ^2(e+f x)\right )^{\frac{1}{2} (1-n p)}+\tan ^2(e+f x) \left ((n p+1) \sec ^2(e+f x)+2\right )\right ) \left (b (c \tan (e+f x))^n\right )^p}{f (n p+1) (n p+3)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^4*(b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Cot[e + f*x]*(b*(c*Tan[e + f*x])^n)^p*((2 + (1 + n*p)*Sec[e + f*x]^2)*Tan[e + f*x]^2 + 2*(-Tan[e + f*x]^2)^((
1 - n*p)/2)))/(f*(1 + n*p)*(3 + n*p))

________________________________________________________________________________________

Maple [F]  time = 0.514, size = 0, normalized size = 0. \begin{align*} \int \left ( \sec \left ( fx+e \right ) \right ) ^{4} \left ( b \left ( c\tan \left ( fx+e \right ) \right ) ^{n} \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^4*(b*(c*tan(f*x+e))^n)^p,x)

[Out]

int(sec(f*x+e)^4*(b*(c*tan(f*x+e))^n)^p,x)

________________________________________________________________________________________

Maxima [A]  time = 1.11682, size = 96, normalized size = 1.48 \begin{align*} \frac{\frac{b^{p}{\left (c^{n}\right )}^{p}{\left (\tan \left (f x + e\right )^{n}\right )}^{p} \tan \left (f x + e\right )^{3}}{n p + 3} + \frac{b^{p}{\left (c^{n}\right )}^{p}{\left (\tan \left (f x + e\right )^{n}\right )}^{p} \tan \left (f x + e\right )}{n p + 1}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")

[Out]

(b^p*(c^n)^p*(tan(f*x + e)^n)^p*tan(f*x + e)^3/(n*p + 3) + b^p*(c^n)^p*(tan(f*x + e)^n)^p*tan(f*x + e)/(n*p +
1))/f

________________________________________________________________________________________

Fricas [A]  time = 1.41611, size = 189, normalized size = 2.91 \begin{align*} \frac{{\left (n p + 2 \, \cos \left (f x + e\right )^{2} + 1\right )} e^{\left (n p \log \left (\frac{c \sin \left (f x + e\right )}{\cos \left (f x + e\right )}\right ) + p \log \left (b\right )\right )} \sin \left (f x + e\right )}{{\left (f n^{2} p^{2} + 4 \, f n p + 3 \, f\right )} \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")

[Out]

(n*p + 2*cos(f*x + e)^2 + 1)*e^(n*p*log(c*sin(f*x + e)/cos(f*x + e)) + p*log(b))*sin(f*x + e)/((f*n^2*p^2 + 4*
f*n*p + 3*f)*cos(f*x + e)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**4*(b*(c*tan(f*x+e))**n)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError